import requests from "./ajax";  //重新封装后的axios

// export const reqCategoryList = (url,data={})=>{
//     // axios 发请求返回的是Promise 对象
//     return requests({
//         url,
//         method:'post',
//         data:data,

//     })
// }



// 登录接口
//  url:'user/login' post
export const reqLogin = (data={})=>requests({ url:'user/login',data,method:'post' })

// 验证码接口
// 当前获取数据的接口，需要给服务器传参,参数都为对象  url:"user/sendVerificationCode" get
export const reqVCode = (data) =>requests({url:'user/sendVerificationCode',data:data,method:'post' })

// 注册
// user/add
export const reqRegister = (data) =>requests({url:'user/add',data:data,method:'post' })

// 获取图片
export const reqIuploadImg = (data) =>requests({url:'shy-course/file/upload',data:data,method:'post' })

// 访问课程
// course/list
export const reqCourseList = (data) =>requests({url:'course/list',data:data,method:'post' })

